An Efficient Hash-Selection-Based Blockchain …
253
selection algorithm is used within the consensus algorithm which assigns different
mathematical difficulty targets to the different tiers of devices to best optimize the
available computational power as shown in Table 5.
Target Selection Algorithm
1: procedure Target Selection
2: If exist(token)=False then
3:
token = Token Generation ()
4: end if
5: if token == T1 then
6:
Target=tar_1
7: else if token ==T2 then
8:
Target=tar_2
9: else if token ==T2 then
10: Target=tar_3
11: else
12: Target=tar_4
13: end if
14: end procedure
Alternate Algorithm for Target Selection
6
Implementation
The model proposed is used in a simulated plant for enhancing the safety and security
of the plant. To test the storage of data securely in blockchain, we have built a
simulation of a plant for IIoT using various smart devices of varying computational
powers with numerous temperature and humidity sensors installed in motors for
multipoint temperature sensing. Compared to existing systems, the proposed system
deliversbetterperformanceintermsofenhancedsecurityandfasterperformance.The
sensors are used to monitor the temperature and humidity of motors for maintaining
the safety of a plant. The system is advantageous and feasible to use for real-time
data in an industry. The sensors chosen give accurate results, which are stored in
blockchain at a comparatively faster rate as the hash function is being used according
to the computational capability of a device. The selection of appropriate hash function
helps in optimum usage of the computational power of a device and hence enhance
the security of data stored in blockchain. We have run the token generation algorithm
(benchmarking) over a range of devices with varying computational powers, using
Python3 as our language of choice. For our test scenario, in the benchmark algorithm,
we have set Range as 10 and Tend as 150 ms, for a total computational time of 1.5 s.